<template>
  <div class="box">
    <h1>我是Child组件</h1>
    <hr />
    <slot name="link"></slot>
    <hr />
    <slot name="content"></slot>
    <hr />

    <li v-for="person in persons" :key="person.id">
      <!-- <p>{{ person.name }}--{{ person.age }}</p> -->
      <slot name="personMessage" :person="person" :a="1" :b="2"></slot>
    </li>

    <h3>底部</h3>
  </div>
</template>

<script>
export default {
  name: "Child",
  props: ["persons"],
};
</script>

<style scoped>
.box {
  background: yellowgreen;
}
</style>
